﻿namespace FluentViewModel.Test
{
    public sealed class ViewModelController : IViewModelController
    {
        private readonly ISomeService someService;

        public ViewModelController(ISomeService someService)
        {
            this.someService = someService;
        }

        public void Save(IPersonViewModel personViewModel)
        {
            ++personViewModel.CommandCounter;
        }

        public void Initialize(IPersonViewModel personViewModel)
        {
            ++personViewModel.InitializeCounter;
        }

        public void Test(IAddressViewModel addressViewModel)
        {
            someService.Test(addressViewModel);
        }
    }
}